package springboot.springMVC.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import springboot.springMVC.model.MessageInfo;

import java.util.List;

@Mapper
public interface MessageMapper {
    @Select("select * from message_info where delete_flag=0")
    List<MessageInfo> queryAll();

    @Insert("insert into message_info (`from`,`to`,say) values (#{from},#{to},#{say})")
    Integer insertMessage(MessageInfo messageInfo);

}
